﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;


namespace Sapro_Project
{
    public partial class PhonePageCadProf : PhoneApplicationPage
    {
        public PhonePageCadProf()
        {
            InitializeComponent();
        }

        private void bt_prof_conf_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Professor prof = new Professor();
                prof.Nome = tb_prof_nome.Text.ToString();
                prof.Email = tb_prof_email.Text.ToString();
                prof.MatriculaProf = Convert.ToInt32(tb_prof_matricula.Text);
                Fachada.ObterFachada().CadastrarProfessor(prof);
            }catch(Exception ex){
                MessageBox.Show("Fu","Oi",MessageBoxButton.OKCancel);
            }
        }
    }
}
